package cn.bqjr.platform.config;


public class DataSourceContextHolder {
	//本地线程全局变量
    private static final ThreadLocal<String> contextHolder  = new ThreadLocal<String>();
    
    public static ThreadLocal<String> getLocal() {
        return contextHolder;
    }
    
    /**
     * 使用setDataSourceType设置当前的
     * @param dataSourceType
     */
    public static void setDataSourceType(String dataSourceType) {
        contextHolder.set(dataSourceType);
    }

    public static String getDataSourceType() {
        return contextHolder.get();
    }

    public static void clearDataSourceType() {
        contextHolder.remove();
    }
}
